---
import config from "../config/config.ts";
import SongList from "../components/SongList.vue";
---

<html lang="en">
	<head>
		<meta charset="utf-8" />
		<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
		<meta name="viewport" content="width=device-width" />
		<meta name="generator" content={Astro.generator} />
		<title>{config.website.title}</title>
	</head>
	<body>
		{/* 配置文件读取测试 */}
		<p>website title: {config.website.title}</p>
		{config.website.enable_editor && <p>editor enabled</p>}
		<p>links:</p>
		{
			config.links?.map((l) => (
				<div class="bg-gray-500">
					<a href={l.link}>
						{l.icon && (
							<img
								src={"public/" + l.icon}
								alt={l.name}
								class="w-6 h-6"
							/>
						)}
						{l.name}
					</a>
				</div>
			))
		}

		<SongList songs={[]} client:load />
	</body>
</html>
